package com.mm.cloud.feign.sys.api.service;

import com.mm.cloud.common.core.constant.SecurityConstants;
import com.mm.cloud.common.core.constant.ServerModuleConstant;
import com.mm.cloud.common.core.result.Result;
import com.mm.cloud.feign.sys.api.dto.BtnPermissionCodeFeignDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * 资源服务
 *
 * @author mr
 * @since 2023-03-30
 */
@FeignClient(name = ServerModuleConstant.MM_SYS)
public interface IPermissionFeignService {

    /**
     * 查询操作权限
     *
     * @param dto
     * @param source
     * @return
     */
    @PostMapping("/feign/api/sys/permission/getBtnPermissionCode")
    Result<List<String>> getBtnPermissionCode(@RequestBody BtnPermissionCodeFeignDTO dto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
